03b976
@@ -699,22 +699,25 @@
private void printStatusInPlace(Map<String, Progress> progressMap, long startTim
 
   // Map 1 ..........
   private String getNameWithProgress(String s, int complete, int total) {
-    float percent = total == 0 ? 0.0f : (float) complete / (float) total;
-    // lets use the remaining space in column 1 as progress bar
-    int spaceRemaining = COLUMN_1_WIDTH - s.length() - 1;
-    String trimmedVName = s;
-
-    // if the vertex name is longer than column 1 width, trim it down
-    // "Tez Merge File Work" will become "Tez Merge File.."
-    if (s != null && s.length() > COLUMN_1_WIDTH) {
-      trimmedVName = s.substring(0, COLUMN_1_WIDTH - 1);
-      trimmedVName = trimmedVName + "..";
-    }
+    String result = "";
+    if (s != null) {
+      float percent = total == 0 ? 0.0f : (float) complete / (float) total;
+      // lets use the remaining space in column 1 as progress bar
+      int spaceRemaining = COLUMN_1_WIDTH - s.length() - 1;
+      String trimmedVName = s;
+
+      // if the vertex name is longer than column 1 width, trim it down
+      // "Tez Merge File Work" will become "Tez Merge File.."
+      if (s.length() > COLUMN_1_WIDTH) {
+        trimmedVName = s.substring(0, COLUMN_1_WIDTH - 1);
+        trimmedVName = trimmedVName + "..";
+      }
 
-    String result = trimmedVName + " ";
-    int toFill = (int) (spaceRemaining * percent);
-    for (int i = 0; i < toFill; i++) {
-      result += ".";
+      result = trimmedVName + " ";
+      int toFill = (int) (spaceRemaining * percent);
+      for (int i = 0; i < toFill; i++) {
+        result += ".";
+      }
     }
     return result;
   }
